SPB Git forge
38commits 1branches 0releases
338.7 MBsize
maindefault branch
6 h agolast push
HTML 53.9% TypeScript 44.5% JavaScript 0.6% SQL 0.5%
555 B · 10 lines tsx
Raw Blame History
1"use client";23import { BarList, type BarListItem } from "@/components/ui/charts";4import { fmtInt, fmtMw } from "@/lib/format";56/** Server pages cannot pass `format` functions to the client BarList — pick the formatter by name here. */7export function CountBarList({ items, unit = "count", showRank = true, className }: { items: BarListItem[]; unit?: "count" | "mw"; showRank?: boolean; className?: string }) {8  return <BarList items={items} format={unit === "mw" ? (v) => fmtMw(v) : (v) => fmtInt(v)} showRank={showRank} className={className} />;9}10